package com.sunshine.spring.helloworld;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Description:
 * @author: Hong.Wei
 * @Date: 2017/3/15 10:59
 */
public class HelloProgram {
    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("spring/bean.xml");
        HelloWorldService service = (HelloWorldService) ctx.getBean("helloWorldService");
        service.sayHello();
        HelloWorld helloWorld = service.getHelloWorld();
        helloWorld.sayHello();
    }
}
